This pull request introduces a PostgreSQL-backed product catalog to the NX AI FastAPI app, enhances the root endpoint to return product data, and adds supporting scripts and tests for database integration. #9
Merged
goldlabelapps merged 12 commits intomasterfrom Mar 19, 2026
Conversation
…ing, main() guards, precision fix, tests Co-authored-by: goldlabelapps <244006120+goldlabelapps@users.noreply.github.com>
Fix DB integration quality: dependency injection, idempotent seeding, price precision, and test isolation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The most important changes are grouped below:
Database Integration & Product Catalog
get_db_connectioninapp/api/routes.pyto manage PostgreSQL connections using environment variables./root endpoint to query theproducttable and return a structured response with product data and metadata.app/seed_product_table.pyto create and seed theproducttable,app/print_products.pyto print product rows, andapp/test_db_connection.pyto test DB connectivity. [1] [2] [3]Testing Enhancements
tests/test_routes.pyto mock database dependencies and verify that the root endpoint returns product data, including integration tests for returned rows and metadata.Documentation & Versioning
README.mdto clarify production readiness, add instructions for running the app and tests, and update descriptions. [1] [2]app/__init__.pyandapp/main.pyto reflect the new release and ensure consistency across the app. [1] [2]